package gz.copydatabase.Activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;

import butterknife.ButterKnife;
import butterknife.OnClick;
import gz.copydatabase.Dialog.ExportDialog;
import gz.copydatabase.R;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
    }
    @OnClick({R.id.record_bt,R.id.user_bt,R.id.import_bt,R.id.export_bt,R.id.exit_bt})
    public void onClick(View view){
        switch (view.getId()) {
            case R.id.record_bt:
                break;
            case R.id.user_bt:
                break;
            case R.id.exit_bt:
                break;
            case R.id.import_bt:
                break;
            case R.id.export_bt:
                ExportDialog exportDialog=null;
                try {
                    exportDialog= new ExportDialog(this);
                    exportDialog.show();
                }catch (Exception e){
                    Toast.makeText(this, "请插入U盘！！", Toast.LENGTH_LONG).show();
                }
                break;
        }
    }
}
